import React from "react"
import { Link,graphql } from "gatsby"

export default function Home({data}) {
  console.log(data)
  return <div>
    <Link to="/person/zhangsan">zhangsan</Link>
    <Link to="/person/lisi">lisi</Link>
    <p>{data.site.siteMetadata.title}</p>
    <p>{data.site.siteMetadata.author}</p>
  </div>
}

export const query = graphql`
  query MyQuery {
    site {
      siteMetadata {
        author
        title
      }
    }
  }
`